<?php
namespace Home\Model;
use Think\Model\RelationModel;
class MessageModel extends RelationModel {

	protected $tablePrefix = 'think_';

	protected $fields = array('id','content','time','user_id',
		 '_type' =>array('id'=>'bigint','content'=>'text','time'=>'date','user_id'=>'bigint')
		);

	protected $pk = 'id';
	
	protected $_link = array(
		'User'=>array(
			'mapping_type' => self::BELONGS_TO,
			'class_name'   => 'User',
			'foreign_key'  => 'user_id',
			'mapping_name' => 'user',
			),
	);
}